package com.gopay.common.constants.bank;

public enum HnaPayOrderStatus {
	
	TRAN_HNAPAY_DEAL_QUERY_ACCEPT("0","已接受"),
	TRAN_HNAPAY_DEAL_QUERY_DEALING("1","处理中"),
	TRAN_HNAPAY_DEAL_QUERY_SUCCESS("2","交易成功"),
	TRAN_HNAPAY_DEAL_QUERY_FAILURE("3","交易失败");
    
	private String key;
    public String value;

    HnaPayOrderStatus(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (HnaPayOrderStatus info : HnaPayOrderStatus.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }

}
